package com.example.bgmachine.bgmachine;

import android.util.Log;

public class Urlinfor {  //http://39.100.244.66/horicheck/uploads/image/02.png  "http://119.45.21.160/smarts/rears"; 8.219.72.62
    public String homeUrl = "http://119.45.21.160/smarts/rears"; // /smarts/rears"http://39.100.244.66/horicheck"; "http://119.45.21.160/smarts/rears"
    public String homeImage = "http://119.45.21.160/smarts/rears";
    static Urlinfor mUrlinfor = null;
    public String mUpdatePaths = "/updateapp/";
    public String mVersion = "2.0.0.1";

    public String mdevicenums = "";
    public String autoCheck = "";
    public String mysqlName = "";
    public String shopInformationId = "";
    public String shopInformationNo = "";
    public String deviceStatus = "";
    public String logoImage = "";


    public  String  registeredEquipment = "/index.php/index/Internet/Registered_equipment";
    public  String  deviceMaterial = "/index.php/index/Internet/getMaterial";

    public  String  cleantime = "/index.php/index/Internet/getCleantime";

    public  String  menus = "/index.php/index/Internet/getMenu";
    public  String  insertSalesvolume = "/index.php/index/Internet/insertSalesvolume";
    public  String  addCleantime = "/index.php/index/Internet/AddCleantime";

    public String mMenuPaths="/uploads/image/";
    public  String  superadditionCleantime = "/index.php/index/Internet/SuperadditionCleantime";


    //public  String  updateSalesvolume = "/index.php/index/Interreq/updateSalesvolume";

//    public  String  cancelSalesvolume = "/index.php/index/Interreq/cancelSalesvolume";
//    public  String  findSalesvolume = "/index.php/index/Interreq/findSalesvolume";
    public  String  updateSalesvolume = "/index.php/index/Internet/updateSalesvolume";

   public  String  cancelSalesvolume = "/index.php/index/Internet/cancelSalesvolume";
   public  String  findSalesvolume = "/index.php/index/Internet/findSalesvolume";


    public  String  devicelogins = "/index.php/admin/Logindevice/logins";
    public  String  payCodes = "/index.php/admin/Orderinfor/requestGetPayCodes";
    public  String  requestGetPayChecks = "/index.php/admin/Orderinfor/requestGetPayChecks";
    public  String  brandDeviceList = "/index.php/admin/Logindevice/getBrandDeviceList";
    public  String  checkAccount = "/index.php/admin/Logindevice/getCheckAccount";
    public  String  changeStatus = "/index.php/admin/Logindevice/getChangeStatus";

    public String brandCodes = "";

    public  String  deviceloginChecks = "/index.php/admin/Logindevice/loginChecks";

    public String mqttHost = "tcp://39.100.244.66:1883";




    public String getMqttHost() {
        String qttHosts = homeUrl;
        qttHosts = qttHosts.replace("http://", "");
        qttHosts = qttHosts.replace("https://", "");
        Log.d("aaa", "getMqttHost:1= " + qttHosts);
        int lena = qttHosts.indexOf("/");
        int lenb = qttHosts.indexOf(":");
        String qttHosta = "";
        if (lenb > 0) {

            qttHosta = qttHosts.substring(0, lenb);

        } else {
            if (lena > 0) {
                qttHosta = qttHosts.substring(0, lena);
            }
        }

        mqttHost = "tcp://" + qttHosta + ":1883";
        Log.d("aaa", "getMqttHost: " + mqttHost);
        return mqttHost;
    }

    public Urlinfor() {
    //this.homeImage =this.homeUrl;
    }

    static public Urlinfor getmUrlinfor() {
        if (mUrlinfor == null) {
            mUrlinfor = new Urlinfor();
        }

        return mUrlinfor;
    }

    public String getmVersion() {
        return mVersion;
    }

    public String getmUpdatePaths() {
        return homeUrl+mUpdatePaths;
    }

    public String getMdevicenums() {
        return mdevicenums;
    }

    public void setMdevicenums(String mdevicenums) {
        this.mdevicenums = mdevicenums;
    }

    public String getRegisteredEquipment() {
        return homeUrl + registeredEquipment;
    }

    public String getAutoCheck() {
        return autoCheck;
    }

    public void setAutoCheck(String autoCheck) {
        this.autoCheck = autoCheck;
    }

    public String getMysqlName() {
        return mysqlName;
    }

    public void setMysqlName(String mysqlName) {
        this.mysqlName = mysqlName;
    }

    public String getShopInformationId() {
        return shopInformationId;
    }

    public String getShopInformationNo() {
        return shopInformationNo;
    }

    public void setShopInformationId(String shopInformationId) {
        this.shopInformationId = shopInformationId;
    }

    public void setShopInformationNo(String shopInformationNo) {
        this.shopInformationNo = shopInformationNo;
    }

    public String getDeviceMaterial() {
        return homeUrl + deviceMaterial;
    }

    public String getCleantime() {
        return  homeUrl + cleantime;
    }

    public String getMkesales() {
        return homeUrl + findSalesvolume;
    }

    public String getMenus() {
        return homeUrl + menus;
    }

    public String getDeviceStatus() {
        return deviceStatus;
    }

    public void setDeviceStatus(String deviceStatus) {
        this.deviceStatus = deviceStatus;
    }

    public String getInsertSalesvolume() {
        return homeUrl +insertSalesvolume;
    }

    public String getAddCleantime() {
        return homeUrl +addCleantime;
    }

    public String getSuperadditionCleantime() {
        return  homeUrl + superadditionCleantime;
    }

    public String getUpdateSalesvolume() {
        return homeUrl + updateSalesvolume;
    }

    public String getCancelSalesvolume() {
        return homeUrl + cancelSalesvolume;
    }

    public String getLogoImage() {
        return logoImage;
    }
    public String getPathsLogoImage() {
        return homeUrl +"/uploads/logo/"+ logoImage;
    }
    public void setLogoImage(String logoImage) {
        this.logoImage = logoImage;
    }


    public String getDevicelogins() {
        return homeUrl + devicelogins;
    }
    public String getDeviceloginChecks() {
        return homeUrl + deviceloginChecks;
    }

    public String getBrandDeviceList() {
        return homeUrl + brandDeviceList;
    }

    public String getCheckAccount() {
        return homeUrl + checkAccount;
    }

    public String getChangeStatus() {
        return homeUrl + changeStatus;
    }


    public String getPayCodes(){
        return homeUrl + payCodes;

    }

    public String getBrandCodes() {
        return brandCodes;
    }

    public void setBrandCodes(String brandCodes) {
        this.brandCodes = brandCodes;
    }
    public String getRequestGetPayChecks(){
        return homeUrl + requestGetPayChecks;

    }
}
